package top.huxy.web.exception;

/**
 * 一个没有堆栈的异常，有些异常不需要堆栈信息，比如用户输入错误的参数
 * @author aproz
 * @Date 2022/3/11
 */
public class NoStackTraceCatchException extends Exception {
    public NoStackTraceCatchException() {
        super();
    }

    public NoStackTraceCatchException(String message) {
        super(message);
    }

    public NoStackTraceCatchException(String message, Throwable cause) {
        super(message, cause);
    }

    public NoStackTraceCatchException(Throwable cause) {
        super(cause);
    }

    protected NoStackTraceCatchException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }

    /**
     * 重写堆栈填充，不填充错误堆栈信息，提高性能
     */
    @Override
    public Throwable fillInStackTrace() {
        return this;
    }
}
